<?php
//rtrim(string $string,string $charachers="\n\r\t\v\x00"):string
//rtrim — 删除字符串末端的空白字符（或者其他字符）

$text = "applecarrot\t\r";
$sanatizie = rtrim($text);
var_dump($sanatizie);
$binary = "\x09Example string\x0A";
$clean = rtrim($binary, "\x00..\x1F");
var_dump($clean);
